<template>
  <div style="width: 100%;">
    <a-table :columns="columns" :dataSource="data">
      <a slot="name" slot-scope="text">{{text}}</a>
    </a-table>
<!--    <div :style="{width:'100%',height:'300px'}">-->
<!--      <el-amap vid="amap" class="amap-demo" :center="center">-->
<!--      </el-amap>-->
<!--    </div>-->
  </div>
</template>
<script>
const columns = [
  {
    title: 'acc',
    dataIndex: 'acc',
    key: 'acc',
    scopedSlots: {customRender: 'name'}
  },
  {
    title: 'direction',
    dataIndex: 'direction',
    key: 'age',
    width: 80
  },
  {
    title: 'gate_time',
    dataIndex: 'gate_time',
    key: 'address 1',
    ellipsis: true
  },
  {
    title: 'gpsInfo',
    dataIndex: 'gpsInfo',
    key: 'address 2',
    ellipsis: true
  },
  {
    title: 'gps_mode',
    dataIndex: 'gps_mode',
    key: 'address 3',
    ellipsis: true
  },
  {
    title: 'gps_speed',
    dataIndex: 'gps_speed',
    key: 'address 4',
    ellipsis: true
  },
  {
    title: 'gps_time',
    dataIndex: 'gps_time',
    key: 'address 4',
    ellipsis: true
  },
  {
    title: 'lat',
    dataIndex: 'lat',
    key: 'address 4',
    ellipsis: true
  },
  {
    title: 'lng',
    dataIndex: 'lng',
    key: 'address 4',
    ellipsis: true
  },
  {
    title: 'posType',
    dataIndex: 'posType',
    key: 'address 4',
    ellipsis: true
  }
]

const data = [
  {
    acc: 1,
    direction: 12,
    gate_time: '2018-09-18 11:13:52',
    gpsInfo: 2,
    gps_mode: 0,
    gps_speed: 10,
    gps_time: '2018-09-18 11:13:51',
    imei: '595c555e040001005b585851090708',
    lat: 22.79561,
    lng: 114.325718,
    posType: '1'
  }
]

export default {
  data () {
    return {
      data,
      columns,
      center: [121.406051, 31.179695]
    }
  },
  mounted () {
  },
  methods: {
  }
}
</script>
